#include <unistd.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>

void*prt(void* args){
    time_t ti;
    for (size_t i = 0; i < 1000; i++)
    {
        time(&ti);
        sleep(1);
        printf("time = %ld\n",ti);
    }
    
    printf("hello %p\n",args);
}
int main(int argc, char*argv[]) {

    pthread_t th1;
    pthread_t th2;
    pthread_create(&th1,NULL,prt,NULL);
    pthread_create(&th2,NULL,prt,NULL);
    pthread_join(th1,NULL);
    pthread_join(th2,NULL);
    return 0;
}
